/**
 * Copyright (C) 2010-2011 TVH Group NV. <kalman.tiboldi@tvh.com>
 *
 * This file is part of the MyStroBe project.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * 		http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 package net.mystrobe.client.connector.quarixbackend.datatypes;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import net.mystrobe.client.SchemaColumnProperties;
import net.mystrobe.client.connector.quarixbackend.Generated;
import net.mystrobe.client.connector.quarixbackend.GeneratorMeta;
import net.mystrobe.client.impl.DAOSchema;

/**
 * 
 * This class was generated by net.mystrobe.client.connector.quarixbackend.ClassGenerator
 * 
 * Used parameters: appName: wicketds dsName: server.customer doName: tt-customer
 * 
 */

@GeneratorMeta(appName="wicketds", urn="server.customer", dsName="server.customer", dsId="dsCustomer", daoId="tt-customer", isLocked=false)
public class CustomerCustomerSchema extends DAOSchema<CustomerCustomer> {

	@Generated
	public enum Cols {
		
		CUSTNUM("cust-num"),
		COUNTRY("country"),
		NAME("name"),
		ADDRESS("address"),
		ADDRESS2("address2"),
		CITY("city"),
		STATE("state"),
		POSTALCODE("postal-code"),
		CONTACT("contact"),
		PHONE("phone"),
		SALESREP("sales-rep"),
		CREDITLIMIT("credit-limit"),
		BALANCE("balance"),
		TERMS("terms"),
		DISCOUNT("discount"),
		COMMENTS("comments")
		;

		private String columnName;
			
		private Cols(String columnName) {
			this.columnName = columnName;
		}

		public String id() {
			return columnName;
		}	

		public String toString() {
			return columnName;
		}
	}

	@Generated
	public CustomerCustomerSchema() {
		asignValues();
	}

	@Generated
	private void asignValues() {
		daoId = "tt-customer";
		iDataTypeClass = CustomerCustomer.class;
		batchSize = 50;
		margin = 5;
		isAutosync = true;
		isOpenOnInit = true;
		isSendChangesOnly = true;
		isSetFilterEveryTime = true;

		properties = new LinkedHashMap<String, Map<SchemaColumnProperties, String>>();

		Map<SchemaColumnProperties, String> rowidProp = new HashMap<SchemaColumnProperties, String>();
		rowidProp.put(SchemaColumnProperties.ReadOnly, "");
		rowidProp.put(SchemaColumnProperties.Format, "");
		rowidProp.put(SchemaColumnProperties.Type, "character");
		rowidProp.put(SchemaColumnProperties.DefaultValue, "");
		rowidProp.put(SchemaColumnProperties.Required, "");
		rowidProp.put(SchemaColumnProperties.Sortable, "");
		rowidProp.put(SchemaColumnProperties.Label, "");
		rowidProp.put(SchemaColumnProperties.Tooltip, "");
		rowidProp.put(SchemaColumnProperties.ViewAs, "");
		properties.put("rowid", rowidProp);

		Map<SchemaColumnProperties, String> rowstateProp = new HashMap<SchemaColumnProperties, String>();
		rowstateProp.put(SchemaColumnProperties.ReadOnly, "");
		rowstateProp.put(SchemaColumnProperties.Format, "");
		rowstateProp.put(SchemaColumnProperties.Type, "integer");
		rowstateProp.put(SchemaColumnProperties.DefaultValue, "0");
		rowstateProp.put(SchemaColumnProperties.Required, "");
		rowstateProp.put(SchemaColumnProperties.Sortable, "");
		rowstateProp.put(SchemaColumnProperties.Label, "");
		rowstateProp.put(SchemaColumnProperties.Tooltip, "");
		rowstateProp.put(SchemaColumnProperties.ViewAs, "");
		properties.put("rowstate", rowstateProp);

		Map<SchemaColumnProperties, String> custnumProp = new HashMap<SchemaColumnProperties, String>();
		custnumProp.put(SchemaColumnProperties.ReadOnly, "");
		custnumProp.put(SchemaColumnProperties.Format, ">>>>9");
		custnumProp.put(SchemaColumnProperties.Type, "integer");
		custnumProp.put(SchemaColumnProperties.DefaultValue, "0");
		custnumProp.put(SchemaColumnProperties.Required, "false");
		custnumProp.put(SchemaColumnProperties.Sortable, "true ");
		custnumProp.put(SchemaColumnProperties.Label, "Cust-Num");
		custnumProp.put(SchemaColumnProperties.Tooltip, "");
		custnumProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("cust-num", custnumProp);

		Map<SchemaColumnProperties, String> countryProp = new HashMap<SchemaColumnProperties, String>();
		countryProp.put(SchemaColumnProperties.ReadOnly, "");
		countryProp.put(SchemaColumnProperties.Format, "x(20)");
		countryProp.put(SchemaColumnProperties.Type, "character");
		countryProp.put(SchemaColumnProperties.DefaultValue, "USA");
		countryProp.put(SchemaColumnProperties.Required, "false");
		countryProp.put(SchemaColumnProperties.Sortable, "true ");
		countryProp.put(SchemaColumnProperties.Label, "Country");
		countryProp.put(SchemaColumnProperties.Tooltip, "");
		countryProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("country", countryProp);

		Map<SchemaColumnProperties, String> nameProp = new HashMap<SchemaColumnProperties, String>();
		nameProp.put(SchemaColumnProperties.ReadOnly, "");
		nameProp.put(SchemaColumnProperties.Format, "x(20)");
		nameProp.put(SchemaColumnProperties.Type, "character");
		nameProp.put(SchemaColumnProperties.DefaultValue, "");
		nameProp.put(SchemaColumnProperties.Required, "false");
		nameProp.put(SchemaColumnProperties.Sortable, "true ");
		nameProp.put(SchemaColumnProperties.Label, "Name");
		nameProp.put(SchemaColumnProperties.Tooltip, "");
		nameProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("name", nameProp);

		Map<SchemaColumnProperties, String> addressProp = new HashMap<SchemaColumnProperties, String>();
		addressProp.put(SchemaColumnProperties.ReadOnly, "");
		addressProp.put(SchemaColumnProperties.Format, "x(20)");
		addressProp.put(SchemaColumnProperties.Type, "character");
		addressProp.put(SchemaColumnProperties.DefaultValue, "");
		addressProp.put(SchemaColumnProperties.Required, "false");
		addressProp.put(SchemaColumnProperties.Sortable, "false");
		addressProp.put(SchemaColumnProperties.Label, "Address");
		addressProp.put(SchemaColumnProperties.Tooltip, "");
		addressProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("address", addressProp);

		Map<SchemaColumnProperties, String> address2Prop = new HashMap<SchemaColumnProperties, String>();
		address2Prop.put(SchemaColumnProperties.ReadOnly, "");
		address2Prop.put(SchemaColumnProperties.Format, "x(20)");
		address2Prop.put(SchemaColumnProperties.Type, "character");
		address2Prop.put(SchemaColumnProperties.DefaultValue, "");
		address2Prop.put(SchemaColumnProperties.Required, "false");
		address2Prop.put(SchemaColumnProperties.Sortable, "false");
		address2Prop.put(SchemaColumnProperties.Label, "Address2");
		address2Prop.put(SchemaColumnProperties.Tooltip, "");
		address2Prop.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("address2", address2Prop);

		Map<SchemaColumnProperties, String> cityProp = new HashMap<SchemaColumnProperties, String>();
		cityProp.put(SchemaColumnProperties.ReadOnly, "");
		cityProp.put(SchemaColumnProperties.Format, "x(12)");
		cityProp.put(SchemaColumnProperties.Type, "character");
		cityProp.put(SchemaColumnProperties.DefaultValue, "");
		cityProp.put(SchemaColumnProperties.Required, "false");
		cityProp.put(SchemaColumnProperties.Sortable, "false");
		cityProp.put(SchemaColumnProperties.Label, "City");
		cityProp.put(SchemaColumnProperties.Tooltip, "");
		cityProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("city", cityProp);

		Map<SchemaColumnProperties, String> stateProp = new HashMap<SchemaColumnProperties, String>();
		stateProp.put(SchemaColumnProperties.ReadOnly, "");
		stateProp.put(SchemaColumnProperties.Format, "x(20)");
		stateProp.put(SchemaColumnProperties.Type, "character");
		stateProp.put(SchemaColumnProperties.DefaultValue, "");
		stateProp.put(SchemaColumnProperties.Required, "false");
		stateProp.put(SchemaColumnProperties.Sortable, "false");
		stateProp.put(SchemaColumnProperties.Label, "State");
		stateProp.put(SchemaColumnProperties.Tooltip, "Enter standard state abbreviation");
		stateProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("state", stateProp);

		Map<SchemaColumnProperties, String> postalcodeProp = new HashMap<SchemaColumnProperties, String>();
		postalcodeProp.put(SchemaColumnProperties.ReadOnly, "");
		postalcodeProp.put(SchemaColumnProperties.Format, "x(10)");
		postalcodeProp.put(SchemaColumnProperties.Type, "character");
		postalcodeProp.put(SchemaColumnProperties.DefaultValue, "");
		postalcodeProp.put(SchemaColumnProperties.Required, "false");
		postalcodeProp.put(SchemaColumnProperties.Sortable, "true ");
		postalcodeProp.put(SchemaColumnProperties.Label, "Postal-Code");
		postalcodeProp.put(SchemaColumnProperties.Tooltip, "Please enter the appropriate Postal Code.");
		postalcodeProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("postal-code", postalcodeProp);

		Map<SchemaColumnProperties, String> contactProp = new HashMap<SchemaColumnProperties, String>();
		contactProp.put(SchemaColumnProperties.ReadOnly, "");
		contactProp.put(SchemaColumnProperties.Format, "x(20)");
		contactProp.put(SchemaColumnProperties.Type, "character");
		contactProp.put(SchemaColumnProperties.DefaultValue, "");
		contactProp.put(SchemaColumnProperties.Required, "false");
		contactProp.put(SchemaColumnProperties.Sortable, "false");
		contactProp.put(SchemaColumnProperties.Label, "Contact");
		contactProp.put(SchemaColumnProperties.Tooltip, "");
		contactProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("contact", contactProp);

		Map<SchemaColumnProperties, String> phoneProp = new HashMap<SchemaColumnProperties, String>();
		phoneProp.put(SchemaColumnProperties.ReadOnly, "");
		phoneProp.put(SchemaColumnProperties.Format, "x(20)");
		phoneProp.put(SchemaColumnProperties.Type, "character");
		phoneProp.put(SchemaColumnProperties.DefaultValue, "");
		phoneProp.put(SchemaColumnProperties.Required, "false");
		phoneProp.put(SchemaColumnProperties.Sortable, "false");
		phoneProp.put(SchemaColumnProperties.Label, "Phone");
		phoneProp.put(SchemaColumnProperties.Tooltip, "");
		phoneProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("phone", phoneProp);

		Map<SchemaColumnProperties, String> salesrepProp = new HashMap<SchemaColumnProperties, String>();
		salesrepProp.put(SchemaColumnProperties.ReadOnly, "");
		salesrepProp.put(SchemaColumnProperties.Format, "X(4)");
		salesrepProp.put(SchemaColumnProperties.Type, "character");
		salesrepProp.put(SchemaColumnProperties.DefaultValue, "");
		salesrepProp.put(SchemaColumnProperties.Required, "false");
		salesrepProp.put(SchemaColumnProperties.Sortable, "true ");
		salesrepProp.put(SchemaColumnProperties.Label, "Sales-Rep");
		salesrepProp.put(SchemaColumnProperties.Tooltip, "");
		salesrepProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("sales-rep", salesrepProp);

		Map<SchemaColumnProperties, String> creditlimitProp = new HashMap<SchemaColumnProperties, String>();
		creditlimitProp.put(SchemaColumnProperties.ReadOnly, "");
		creditlimitProp.put(SchemaColumnProperties.Format, "->,>>>,>>9");
		creditlimitProp.put(SchemaColumnProperties.Type, "decimal");
		creditlimitProp.put(SchemaColumnProperties.DefaultValue, "1,500");
		creditlimitProp.put(SchemaColumnProperties.Required, "false");
		creditlimitProp.put(SchemaColumnProperties.Sortable, "false");
		creditlimitProp.put(SchemaColumnProperties.Label, "Credit-Limit");
		creditlimitProp.put(SchemaColumnProperties.Tooltip, "Please enter a Credit Limit");
		creditlimitProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("credit-limit", creditlimitProp);

		Map<SchemaColumnProperties, String> balanceProp = new HashMap<SchemaColumnProperties, String>();
		balanceProp.put(SchemaColumnProperties.ReadOnly, "");
		balanceProp.put(SchemaColumnProperties.Format, "->,>>>,>>9.99");
		balanceProp.put(SchemaColumnProperties.Type, "decimal");
		balanceProp.put(SchemaColumnProperties.DefaultValue, "0.00");
		balanceProp.put(SchemaColumnProperties.Required, "false");
		balanceProp.put(SchemaColumnProperties.Sortable, "false");
		balanceProp.put(SchemaColumnProperties.Label, "Balance");
		balanceProp.put(SchemaColumnProperties.Tooltip, "");
		balanceProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("balance", balanceProp);

		Map<SchemaColumnProperties, String> termsProp = new HashMap<SchemaColumnProperties, String>();
		termsProp.put(SchemaColumnProperties.ReadOnly, "");
		termsProp.put(SchemaColumnProperties.Format, "x(20)");
		termsProp.put(SchemaColumnProperties.Type, "character");
		termsProp.put(SchemaColumnProperties.DefaultValue, "Net30");
		termsProp.put(SchemaColumnProperties.Required, "false");
		termsProp.put(SchemaColumnProperties.Sortable, "false");
		termsProp.put(SchemaColumnProperties.Label, "Terms");
		termsProp.put(SchemaColumnProperties.Tooltip, "");
		termsProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("terms", termsProp);

		Map<SchemaColumnProperties, String> discountProp = new HashMap<SchemaColumnProperties, String>();
		discountProp.put(SchemaColumnProperties.ReadOnly, "");
		discountProp.put(SchemaColumnProperties.Format, ">>9%");
		discountProp.put(SchemaColumnProperties.Type, "integer");
		discountProp.put(SchemaColumnProperties.DefaultValue, "0%");
		discountProp.put(SchemaColumnProperties.Required, "false");
		discountProp.put(SchemaColumnProperties.Sortable, "false");
		discountProp.put(SchemaColumnProperties.Label, "Discount");
		discountProp.put(SchemaColumnProperties.Tooltip, "Enter a percentage from 0 to 999");
		discountProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("discount", discountProp);

		Map<SchemaColumnProperties, String> commentsProp = new HashMap<SchemaColumnProperties, String>();
		commentsProp.put(SchemaColumnProperties.ReadOnly, "");
		commentsProp.put(SchemaColumnProperties.Format, "x(60)");
		commentsProp.put(SchemaColumnProperties.Type, "character");
		commentsProp.put(SchemaColumnProperties.DefaultValue, "");
		commentsProp.put(SchemaColumnProperties.Required, "false");
		commentsProp.put(SchemaColumnProperties.Sortable, "true ");
		commentsProp.put(SchemaColumnProperties.Label, "Comments");
		commentsProp.put(SchemaColumnProperties.Tooltip, "");
		commentsProp.put(SchemaColumnProperties.ViewAs, "fill-in");
		properties.put("comments", commentsProp);
	}
}

